﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Modularity;
using YasharEl.Infrastructure.PresentationModel.Prism;
using YasharEl.Infrastructure.ObjectFactory;
using YasharEl.Infrastructure.PresentationModel.Prism.Services;

namespace RemoteTranslator.AssistentApplication.Modules.VideoTransmit
{
    [Module(ModuleName = "VideoTransmit")]
    [ModuleDependency("TeamTalkCommunication")]
    public class VideoTransmitModule : ModuleBase
    {
        VideoTransmitView view;
		const string defaultRegion = RegionNames.Workspace;

        public VideoTransmitModule()
		{
			Initialized += OnInitialized;
		}

		void OnInitialized(object sender, EventArgs e)
		{
            view = new VideoTransmitView();
			var viewService = DependencyContainer.Resolve<IViewService>();
			/* TODO: Make localizable resource. 
			 Don't use view.Name as it may change at runtime. */
            viewService.RegisterView("Video Transmit", obj => ShowView(defaultRegion, view, true), null, null, null);
			ShowView(defaultRegion, view, false);
		}
    }
}
